package com.itheima.demo02;

public class Demo_Polymorphism {
    //  多态访问特点:
    //成员变量: 编译看左边(父类),执行看右边(子类)!
    //in
    public static void main(String[] args) {
        method(new Zi());
        Fu f1 = new Zi();
        Zi z = (Zi) f1;
        z.method01();
        Fu f2 = new Fu();
        f2.method();
    }

    public static void method(Fu f) {
        f.method();
    }
    
}
